{template "content","header"}
<div class="ui-header">
		<a href="javascript:history.go(-1);" id="icoback" class="header-btn left-pos">返回</a>
		<h1 class="ui-title">商家介绍</h1>
	</div>
	<div id="wrapper">
		<div class="clear txtcontent">
			<h1 style="margin-bottom:10px;" class="clear">{$con['name']}<span  style="float:right;font-size:12px;">评价：{intval($stat['avg(good)'])}星</span></h1>
			<?	
				$review = pc_base::load_model('review_model');
				$stat =  $review->query('SELECT avg(good) FROM v9_review WHERE shop_id ='.$con['userid']);
				$stat=mysql_fetch_assoc($stat);
			?>
			
			
			<div class="clear">
				<img src="{$con['image']}" style="max-width:80%;height:120px;margin:5px auto;border:3px solid #FFF;display:block" />
			   <p class="">电话：{$con['tel']}</p>
			   <p class="">地址：{$con['address']}</p>
				<table class="table" style="background:#FFF">
					<thead>
					  <tr>
						<th>服务名</th>
						<th>原价</th>
						<th>价格</th>
					  </tr>
					</thead>
					<tbody>
				{pc:get sql="SELECT * FROM phpcms_good WHERE shop_id=$con[userid] ORDER BY listorder DESC,ID DESC"  num="50" return="data"} 
				{loop $data $key $val} 
					  <tr>
						<td>{$val[title]}</td>
						<td>￥{$val[yuan]}元</td>
						<td>￥{$val[price]}元</td>
					  </tr>
				{/loop}
				{/pc}
					</tbody>
				  </table>
				  <div style="text-align:center">
					<a class="btn btn-large btn-warning" href="{APP_PATH}index.php?m=member&c=mobile&a=yuyue&id={$con[userid]}">预约</a>
					{php $position = explode('|',$con[position]);}
					<a class="btn btn-large btn-primary" href="http://api.map.baidu.com/marker?location={$position[0]},{$position[1]}&title={$con['name']}&content={$con['address']}&output=html">导航</a>
				</div>
			</div>
		</div>
		
		</div><!-- /wrapper -->
	</div>

		<script type="text/javascript">
			//js模拟滚动条
			var myScroll;
			function loaded() {
				var myscroll=new iScroll("wrapper",{hScrollbar:true, vScrollbar:true});
			}

			document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
			document.addEventListener('DOMContentLoaded', loaded, false);
		</script>

</body>
</html>

{template "content","footer"}